{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "genetic-algorithm-python-tutorial.ipynb",
      "provenance": [],
      "collapsed_sections": [],
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/towardsai/tutorials/blob/master/genetic-algorithm-tutorial/genetic_algorithm_python_tutorial.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "JtuFpCdHdewP"
      },
      "source": [
        "# Genetic Algorithm Implementation with Python\r\n",
        "\r\n",
        "* Tutorial: https://towardsai.net/p/computer-science/genetic-algorithm-ga-introduction-with-example-code-e59f9bc58eaf\r\n",
        "\r\n",
        "* Github: https://github.com/towardsai/tutorials/tree/master/genetic-algorithm-tutorial"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "4b5MIFQ1hfnS"
      },
      "source": [
        "The Genetic Algorithm is a class of evolutionary algorithm that is broadly inspired by biological evolution. We all know evolution, it is a selection of parents, reproduction, and mutation of offsprings. The main aim of evolution is to reproduce offsprings that are biologically better than their parents. Genetic algorithm is mainly based on natural selection and it tries to simulate the theory of evolution."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "gztYXZXUKPaR"
      },
      "source": [
        "import numpy as np\r\n",
        "import matplotlib.pyplot as plt\r\n",
        "import copy"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "3UmSq06KNWcM"
      },
      "source": [
        "# cost function\r\n",
        "def sphere(x):\r\n",
        "  ''' This is the problem we will be\r\n",
        "  optimizing, each chromosome of parent has a cost\r\n",
        "  which is calculated from this cost function'''\r\n",
        "  \r\n",
        "  return sum(x**2)"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "SxLH5TqHJZLj"
      },
      "source": [
        "def roulette_wheel_selection(p):\r\n",
        "  ''' Roulette Wheel Selection is a method of parent \r\n",
        "  selection for breeding. We take the cummulative sum of probabilities\r\n",
        "  and select the first parent whose cummulative sum is greater than\r\n",
        "  random number'''\r\n",
        "\r\n",
        "  c = np.cumsum(p)\r\n",
        "  r = sum(p) * np.random.rand()\r\n",
        "  ind = np.argwhere(r <= c)\r\n",
        "  \r\n",
        "  return ind[0][0]"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "t5k8SZG8PBzl"
      },
      "source": [
        "def crossover(p1, p2):\r\n",
        "  ''' Performing uniform crossover. Alpha is the flag\r\n",
        "  that determines which gene of each chromosome is choosen\r\n",
        "  to be inherited by the offspring. Maultiply the alpha value\r\n",
        "  with each gene of every chromosome of both the parents and\r\n",
        "  then add the resultant value to get child chromosome'''\r\n",
        "  \r\n",
        "  c1 = copy.deepcopy(p1)\r\n",
        "  c2 = copy.deepcopy(p2)\r\n",
        "\r\n",
        "  # Uniform crossover\r\n",
        "  alpha = np.random.uniform(0, 1, *(c1['position'].shape))\r\n",
        "  c1['position'] = alpha*p1['position'] + (1-alpha)*p2['position']\r\n",
        "  c2['position'] = alpha*p2['position'] + (1-alpha)*p1['position']\r\n",
        "\r\n",
        "  return c1, c2"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "lj1lXvstR60J"
      },
      "source": [
        "def mutate(c, mu, sigma):\r\n",
        "  '''\r\n",
        "  c: child chromosome \r\n",
        "  mu: mutation rate. % of gene to be modified\r\n",
        "  sigma: step size of mutation'''\r\n",
        "\r\n",
        "  y = copy.deepcopy(c)\r\n",
        "  flag = np.random.rand(*(c['position'].shape)) <= mu  # array of True and Flase, indicating at which position to perform mutation\r\n",
        "  ind = np.argwhere(flag)\r\n",
        "  y['position'][ind] += sigma * np.random.randn(*ind.shape)\r\n",
        "  \r\n",
        "  return y"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ABGi6CxQamRp"
      },
      "source": [
        "def bounds(c, varmin, varmax):\r\n",
        "  ''' Defines the upper and lower bound of gene value'''\r\n",
        "  \r\n",
        "  c['position'] = np.maximum(c['position'], varmin)\r\n",
        "  c['position'] = np.minimum(c['position'], varmax)"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "zDKprAqQ9Q8A"
      },
      "source": [
        "def sort(arr):\r\n",
        "  ''' Bubble sorting the population + offsoring\r\n",
        "  in every iteration to get best fit individuals at top'''\r\n",
        "  \r\n",
        "  n = len(arr) \r\n",
        "  \r\n",
        "  for i in range(n-1): \r\n",
        "  \r\n",
        "    for j in range(0, n-i-1):  \r\n",
        "            if arr[j]['cost'] > arr[j+1]['cost'] : \r\n",
        "                arr[j], arr[j+1] = arr[j+1], arr[j]\r\n",
        "    return arr"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "sQcjnXDDN8W0"
      },
      "source": [
        "def ga(costfunc, num_var, varmin, varmax, maxit, npop, num_children, mu, sigma, beta):\r\n",
        "  \r\n",
        "  # Placeholder for each individual\r\n",
        "  population = {}\r\n",
        "  for i in range(npop):                                                         # each inidivdual has position(chromosomes) and cost,\r\n",
        "    population[i] = {'position': None, 'cost': None}                            # create individual as many as population size(npop)\r\n",
        "\r\n",
        "  # Best solution found\r\n",
        "  bestsol = copy.deepcopy(population)\r\n",
        "  bestsol_cost = np.inf                                                         # initial best cost is infinity\r\n",
        "\r\n",
        "  # Initialize population - 1st Gen\r\n",
        "  for i in range(npop):\r\n",
        "      population[i]['position'] = np.random.uniform(varmin, varmax, num_var)    # randomly initialize the chromosomes and cost\r\n",
        "      population[i]['cost'] = costfunc(population[i]['position'])\r\n",
        "\r\n",
        "      if population[i]['cost'] < bestsol_cost:                                  # if cost of an individual is less(best) than best cost,\r\n",
        "        bestsol = copy.deepcopy(population[i])                                  # replace the best solution with that individual\r\n",
        "\r\n",
        "  # Best cost of each generation/iteration\r\n",
        "  bestcost = np.empty(maxit)\r\n",
        "\r\n",
        "  # Main loop\r\n",
        "  for it in range(maxit):\r\n",
        "\r\n",
        "    # Calculating probability for roulette wheel selection\r\n",
        "    costs = []\r\n",
        "    for i in range(len(population)):\r\n",
        "      costs.append(population[i]['cost'])                                       # list of all the population cost\r\n",
        "    costs = np.array(costs)\r\n",
        "    avg_cost = np.mean(costs)                                                   # taking average of the costs \r\n",
        "    if avg_cost != 0:\r\n",
        "      costs = costs/avg_cost\r\n",
        "    probs = np.exp(-beta*costs)                                                 # probability is exponensial of -ve beta times costs\r\n",
        "\r\n",
        "    for _ in range(num_children//2):                                            # we will be having two off springs for each crossover \r\n",
        "                                                                                # hence divide number of children by 2\r\n",
        "      '''   \r\n",
        "      -> choosing two parents randomly for mating\r\n",
        "      -> we are shuffling all the 20 parent individuals and\r\n",
        "      -> choosing first two of the shuffled array as our parents for mating \r\n",
        "      \r\n",
        "      Randomly selecting parents by shiffling them.\r\n",
        "      But we will be using roulette wheel slection \r\n",
        "      for our algorithm\r\n",
        "\r\n",
        "      q = np.random.permutation(npop)\r\n",
        "      p1 = population[q[0]]\r\n",
        "      p2 = population[q[1]]\r\n",
        "      '''\r\n",
        "\r\n",
        "      # Roulette wheel selection\r\n",
        "      p1 = population[roulette_wheel_selection(probs)]\r\n",
        "      p2 = population[roulette_wheel_selection(probs)]\r\n",
        "\r\n",
        "      # crossover two parents\r\n",
        "      c1, c2 = crossover(p1, p2)\r\n",
        "          \r\n",
        "      # Perform mutation\r\n",
        "      c1 = mutate(c1, mu, sigma)\r\n",
        "      c2 = mutate(c2, mu, sigma)\r\n",
        "      \r\n",
        "      # Apply bounds\r\n",
        "      bounds(c1, varmin, varmax)\r\n",
        "      bounds(c2, varmin, varmax)\r\n",
        "      \r\n",
        "      # Evaluate first off spring\r\n",
        "      c1['cost'] = costfunc(c1['position'])                                     # calculate cost function of child 1\r\n",
        "      \r\n",
        "      if type(bestsol_cost) == float:\r\n",
        "        if c1['cost'] < bestsol_cost:                                           # replacing best solution in every generation/iteration\r\n",
        "          bestsol_cost = copy.deepcopy(c1)\r\n",
        "      else:\r\n",
        "        if c1['cost'] < bestsol_cost['cost']:                                   # replacing best solution in every generation/iteration\r\n",
        "          bestsol_cost = copy.deepcopy(c1)\r\n",
        "\r\n",
        "      \r\n",
        "      # Evaluate second off spring\r\n",
        "      if c2['cost'] < bestsol_cost['cost']:                                     # replacing best solution in every generation/iteration\r\n",
        "        bestsol_cost = copy.deepcopy(c2)\r\n",
        "    \r\n",
        "    # Merge, Sort and Select\r\n",
        "    population[len(population)] = c1\r\n",
        "    population[len(population)] = c2\r\n",
        "\r\n",
        "    population = sort(population)\r\n",
        "\r\n",
        "    # Store best cost\r\n",
        "    bestcost[it] = bestsol_cost['cost']\r\n",
        "\r\n",
        "    # Show generation information\r\n",
        "    print('Iteration {}: Best Cost = {}'. format(it, bestcost[it]))\r\n",
        "\r\n",
        "\r\n",
        "  out = population\r\n",
        "  Bestsol = bestsol\r\n",
        "  bestcost = bestcost\r\n",
        "  return (out, Bestsol, bestcost)"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "id": "ubYigCmLNh2-",
        "outputId": "6f6de630-30cf-4983-db35-7542037f8e39"
      },
      "source": [
        "# Problem definition\r\n",
        "costfunc = sphere\r\n",
        "num_var = 5       # number of decicion variables\r\n",
        "varmin = -10      # lower bound\r\n",
        "varmax = 10       # upper bound\r\n",
        "\r\n",
        "# GA Parameters\r\n",
        "maxit = 501                                              # number of iterations\r\n",
        "npop = 20                                                # initial population size\r\n",
        "beta = 1\r\n",
        "prop_children = 1                                        # proportion of children to population\r\n",
        "num_children = int(np.round(prop_children * npop/2)*2)   # making sure it always an even number\r\n",
        "mu = 0.2                                                 # mutation rate 20%, 205 of 5 is 1, mutating 1 gene\r\n",
        "sigma = 0.1                                              # step size of mutation\r\n",
        "\r\n",
        "\r\n",
        "# Run GA\r\n",
        "out = ga(costfunc, num_var, varmin, varmax, maxit, npop, num_children, mu, sigma, beta)\r\n",
        "\r\n",
        "# Results\r\n",
        "#(out, Bestsol, bestcost)\r\n",
        "plt.plot(out[2])\r\n",
        "plt.xlim(0, maxit)\r\n",
        "plt.xlabel('Generations')\r\n",
        "plt.ylabel('Best Cost')\r\n",
        "plt.title('Genetic Algorithm')\r\n",
        "plt.grid(True)\r\n",
        "plt.show"
      ],
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Iteration 0: Best Cost = 10.85145901655957\n",
            "Iteration 1: Best Cost = 10.85145901655957\n",
            "Iteration 2: Best Cost = 10.85145901655957\n",
            "Iteration 3: Best Cost = 10.85145901655957\n",
            "Iteration 4: Best Cost = 10.85145901655957\n",
            "Iteration 5: Best Cost = 10.85145901655957\n",
            "Iteration 6: Best Cost = 10.85145901655957\n",
            "Iteration 7: Best Cost = 10.85145901655957\n",
            "Iteration 8: Best Cost = 10.85145901655957\n",
            "Iteration 9: Best Cost = 10.85145901655957\n",
            "Iteration 10: Best Cost = 10.85145901655957\n",
            "Iteration 11: Best Cost = 9.113379273292797\n",
            "Iteration 12: Best Cost = 9.113379273292797\n",
            "Iteration 13: Best Cost = 9.113379273292797\n",
            "Iteration 14: Best Cost = 9.113379273292797\n",
            "Iteration 15: Best Cost = 9.113379273292797\n",
            "Iteration 16: Best Cost = 8.884324613128374\n",
            "Iteration 17: Best Cost = 2.1560160039337686\n",
            "Iteration 18: Best Cost = 2.1560160039337686\n",
            "Iteration 19: Best Cost = 2.1560160039337686\n",
            "Iteration 20: Best Cost = 2.1560160039337686\n",
            "Iteration 21: Best Cost = 2.1560160039337686\n",
            "Iteration 22: Best Cost = 2.1560160039337686\n",
            "Iteration 23: Best Cost = 2.1560160039337686\n",
            "Iteration 24: Best Cost = 2.1560160039337686\n",
            "Iteration 25: Best Cost = 2.1560160039337686\n",
            "Iteration 26: Best Cost = 2.1560160039337686\n",
            "Iteration 27: Best Cost = 2.1560160039337686\n",
            "Iteration 28: Best Cost = 2.1560160039337686\n",
            "Iteration 29: Best Cost = 2.1560160039337686\n",
            "Iteration 30: Best Cost = 2.1560160039337686\n",
            "Iteration 31: Best Cost = 2.1560160039337686\n",
            "Iteration 32: Best Cost = 2.1560160039337686\n",
            "Iteration 33: Best Cost = 2.1560160039337686\n",
            "Iteration 34: Best Cost = 2.1560160039337686\n",
            "Iteration 35: Best Cost = 2.1560160039337686\n",
            "Iteration 36: Best Cost = 2.1560160039337686\n",
            "Iteration 37: Best Cost = 2.1560160039337686\n",
            "Iteration 38: Best Cost = 2.1560160039337686\n",
            "Iteration 39: Best Cost = 2.1560160039337686\n",
            "Iteration 40: Best Cost = 2.1560160039337686\n",
            "Iteration 41: Best Cost = 2.1560160039337686\n",
            "Iteration 42: Best Cost = 2.1560160039337686\n",
            "Iteration 43: Best Cost = 2.1560160039337686\n",
            "Iteration 44: Best Cost = 2.1560160039337686\n",
            "Iteration 45: Best Cost = 2.1560160039337686\n",
            "Iteration 46: Best Cost = 2.1560160039337686\n",
            "Iteration 47: Best Cost = 2.1560160039337686\n",
            "Iteration 48: Best Cost = 2.1560160039337686\n",
            "Iteration 49: Best Cost = 2.1560160039337686\n",
            "Iteration 50: Best Cost = 2.1560160039337686\n",
            "Iteration 51: Best Cost = 2.1560160039337686\n",
            "Iteration 52: Best Cost = 2.1560160039337686\n",
            "Iteration 53: Best Cost = 2.1560160039337686\n",
            "Iteration 54: Best Cost = 2.1560160039337686\n",
            "Iteration 55: Best Cost = 2.1560160039337686\n",
            "Iteration 56: Best Cost = 2.1560160039337686\n",
            "Iteration 57: Best Cost = 2.1560160039337686\n",
            "Iteration 58: Best Cost = 2.1560160039337686\n",
            "Iteration 59: Best Cost = 2.1560160039337686\n",
            "Iteration 60: Best Cost = 2.1560160039337686\n",
            "Iteration 61: Best Cost = 2.1560160039337686\n",
            "Iteration 62: Best Cost = 2.1560160039337686\n",
            "Iteration 63: Best Cost = 2.1560160039337686\n",
            "Iteration 64: Best Cost = 2.1560160039337686\n",
            "Iteration 65: Best Cost = 2.1560160039337686\n",
            "Iteration 66: Best Cost = 2.1560160039337686\n",
            "Iteration 67: Best Cost = 2.1560160039337686\n",
            "Iteration 68: Best Cost = 2.1560160039337686\n",
            "Iteration 69: Best Cost = 2.1560160039337686\n",
            "Iteration 70: Best Cost = 1.986436990537911\n",
            "Iteration 71: Best Cost = 1.986436990537911\n",
            "Iteration 72: Best Cost = 1.986436990537911\n",
            "Iteration 73: Best Cost = 1.986436990537911\n",
            "Iteration 74: Best Cost = 1.986436990537911\n",
            "Iteration 75: Best Cost = 1.986436990537911\n",
            "Iteration 76: Best Cost = 1.986436990537911\n",
            "Iteration 77: Best Cost = 1.986436990537911\n",
            "Iteration 78: Best Cost = 1.986436990537911\n",
            "Iteration 79: Best Cost = 1.986436990537911\n",
            "Iteration 80: Best Cost = 1.986436990537911\n",
            "Iteration 81: Best Cost = 1.986436990537911\n",
            "Iteration 82: Best Cost = 1.986436990537911\n",
            "Iteration 83: Best Cost = 1.986436990537911\n",
            "Iteration 84: Best Cost = 1.986436990537911\n",
            "Iteration 85: Best Cost = 1.986436990537911\n",
            "Iteration 86: Best Cost = 1.986436990537911\n",
            "Iteration 87: Best Cost = 1.986436990537911\n",
            "Iteration 88: Best Cost = 1.986436990537911\n",
            "Iteration 89: Best Cost = 1.986436990537911\n",
            "Iteration 90: Best Cost = 1.986436990537911\n",
            "Iteration 91: Best Cost = 1.986436990537911\n",
            "Iteration 92: Best Cost = 1.986436990537911\n",
            "Iteration 93: Best Cost = 1.986436990537911\n",
            "Iteration 94: Best Cost = 1.986436990537911\n",
            "Iteration 95: Best Cost = 1.986436990537911\n",
            "Iteration 96: Best Cost = 1.986436990537911\n",
            "Iteration 97: Best Cost = 1.986436990537911\n",
            "Iteration 98: Best Cost = 1.986436990537911\n",
            "Iteration 99: Best Cost = 1.986436990537911\n",
            "Iteration 100: Best Cost = 1.986436990537911\n",
            "Iteration 101: Best Cost = 1.986436990537911\n",
            "Iteration 102: Best Cost = 1.986436990537911\n",
            "Iteration 103: Best Cost = 1.986436990537911\n",
            "Iteration 104: Best Cost = 1.986436990537911\n",
            "Iteration 105: Best Cost = 1.986436990537911\n",
            "Iteration 106: Best Cost = 1.986436990537911\n",
            "Iteration 107: Best Cost = 1.986436990537911\n",
            "Iteration 108: Best Cost = 1.986436990537911\n",
            "Iteration 109: Best Cost = 1.986436990537911\n",
            "Iteration 110: Best Cost = 1.986436990537911\n",
            "Iteration 111: Best Cost = 1.986436990537911\n",
            "Iteration 112: Best Cost = 1.986436990537911\n",
            "Iteration 113: Best Cost = 1.986436990537911\n",
            "Iteration 114: Best Cost = 1.986436990537911\n",
            "Iteration 115: Best Cost = 1.986436990537911\n",
            "Iteration 116: Best Cost = 1.986436990537911\n",
            "Iteration 117: Best Cost = 1.986436990537911\n",
            "Iteration 118: Best Cost = 1.986436990537911\n",
            "Iteration 119: Best Cost = 1.986436990537911\n",
            "Iteration 120: Best Cost = 1.986436990537911\n",
            "Iteration 121: Best Cost = 1.986436990537911\n",
            "Iteration 122: Best Cost = 1.986436990537911\n",
            "Iteration 123: Best Cost = 1.986436990537911\n",
            "Iteration 124: Best Cost = 1.986436990537911\n",
            "Iteration 125: Best Cost = 1.986436990537911\n",
            "Iteration 126: Best Cost = 1.986436990537911\n",
            "Iteration 127: Best Cost = 1.986436990537911\n",
            "Iteration 128: Best Cost = 1.986436990537911\n",
            "Iteration 129: Best Cost = 1.986436990537911\n",
            "Iteration 130: Best Cost = 1.986436990537911\n",
            "Iteration 131: Best Cost = 1.986436990537911\n",
            "Iteration 132: Best Cost = 1.986436990537911\n",
            "Iteration 133: Best Cost = 1.986436990537911\n",
            "Iteration 134: Best Cost = 1.986436990537911\n",
            "Iteration 135: Best Cost = 1.986436990537911\n",
            "Iteration 136: Best Cost = 1.986436990537911\n",
            "Iteration 137: Best Cost = 1.986436990537911\n",
            "Iteration 138: Best Cost = 1.986436990537911\n",
            "Iteration 139: Best Cost = 1.986436990537911\n",
            "Iteration 140: Best Cost = 1.986436990537911\n",
            "Iteration 141: Best Cost = 1.986436990537911\n",
            "Iteration 142: Best Cost = 1.986436990537911\n",
            "Iteration 143: Best Cost = 1.986436990537911\n",
            "Iteration 144: Best Cost = 1.986436990537911\n",
            "Iteration 145: Best Cost = 1.986436990537911\n",
            "Iteration 146: Best Cost = 1.986436990537911\n",
            "Iteration 147: Best Cost = 1.986436990537911\n",
            "Iteration 148: Best Cost = 1.986436990537911\n",
            "Iteration 149: Best Cost = 1.986436990537911\n",
            "Iteration 150: Best Cost = 1.986436990537911\n",
            "Iteration 151: Best Cost = 1.986436990537911\n",
            "Iteration 152: Best Cost = 1.986436990537911\n",
            "Iteration 153: Best Cost = 1.986436990537911\n",
            "Iteration 154: Best Cost = 1.986436990537911\n",
            "Iteration 155: Best Cost = 1.986436990537911\n",
            "Iteration 156: Best Cost = 1.986436990537911\n",
            "Iteration 157: Best Cost = 1.986436990537911\n",
            "Iteration 158: Best Cost = 1.986436990537911\n",
            "Iteration 159: Best Cost = 1.986436990537911\n",
            "Iteration 160: Best Cost = 1.986436990537911\n",
            "Iteration 161: Best Cost = 1.986436990537911\n",
            "Iteration 162: Best Cost = 1.986436990537911\n",
            "Iteration 163: Best Cost = 1.986436990537911\n",
            "Iteration 164: Best Cost = 1.986436990537911\n",
            "Iteration 165: Best Cost = 1.986436990537911\n",
            "Iteration 166: Best Cost = 1.986436990537911\n",
            "Iteration 167: Best Cost = 1.986436990537911\n",
            "Iteration 168: Best Cost = 1.986436990537911\n",
            "Iteration 169: Best Cost = 1.986436990537911\n",
            "Iteration 170: Best Cost = 1.986436990537911\n",
            "Iteration 171: Best Cost = 1.986436990537911\n",
            "Iteration 172: Best Cost = 1.986436990537911\n",
            "Iteration 173: Best Cost = 1.986436990537911\n",
            "Iteration 174: Best Cost = 1.986436990537911\n",
            "Iteration 175: Best Cost = 1.986436990537911\n",
            "Iteration 176: Best Cost = 1.986436990537911\n",
            "Iteration 177: Best Cost = 1.986436990537911\n",
            "Iteration 178: Best Cost = 1.986436990537911\n",
            "Iteration 179: Best Cost = 1.986436990537911\n",
            "Iteration 180: Best Cost = 1.986436990537911\n",
            "Iteration 181: Best Cost = 1.986436990537911\n",
            "Iteration 182: Best Cost = 1.986436990537911\n",
            "Iteration 183: Best Cost = 1.986436990537911\n",
            "Iteration 184: Best Cost = 1.986436990537911\n",
            "Iteration 185: Best Cost = 1.986436990537911\n",
            "Iteration 186: Best Cost = 1.986436990537911\n",
            "Iteration 187: Best Cost = 1.9526798973430741\n",
            "Iteration 188: Best Cost = 1.9526798973430741\n",
            "Iteration 189: Best Cost = 1.9526798973430741\n",
            "Iteration 190: Best Cost = 1.9526798973430741\n",
            "Iteration 191: Best Cost = 1.9526798973430741\n",
            "Iteration 192: Best Cost = 1.9526798973430741\n",
            "Iteration 193: Best Cost = 1.9526798973430741\n",
            "Iteration 194: Best Cost = 1.9526798973430741\n",
            "Iteration 195: Best Cost = 1.9526798973430741\n",
            "Iteration 196: Best Cost = 1.9526798973430741\n",
            "Iteration 197: Best Cost = 1.9526798973430741\n",
            "Iteration 198: Best Cost = 1.9526798973430741\n",
            "Iteration 199: Best Cost = 1.9526798973430741\n",
            "Iteration 200: Best Cost = 1.9526798973430741\n",
            "Iteration 201: Best Cost = 1.9526798973430741\n",
            "Iteration 202: Best Cost = 1.9526798973430741\n",
            "Iteration 203: Best Cost = 1.9526798973430741\n",
            "Iteration 204: Best Cost = 1.9526798973430741\n",
            "Iteration 205: Best Cost = 1.9526798973430741\n",
            "Iteration 206: Best Cost = 1.9526798973430741\n",
            "Iteration 207: Best Cost = 1.9526798973430741\n",
            "Iteration 208: Best Cost = 1.9526798973430741\n",
            "Iteration 209: Best Cost = 1.9526798973430741\n",
            "Iteration 210: Best Cost = 1.9526798973430741\n",
            "Iteration 211: Best Cost = 1.9526798973430741\n",
            "Iteration 212: Best Cost = 1.9526798973430741\n",
            "Iteration 213: Best Cost = 1.9526798973430741\n",
            "Iteration 214: Best Cost = 1.9526798973430741\n",
            "Iteration 215: Best Cost = 1.9526798973430741\n",
            "Iteration 216: Best Cost = 1.9526798973430741\n",
            "Iteration 217: Best Cost = 1.9324396818212954\n",
            "Iteration 218: Best Cost = 1.9324396818212954\n",
            "Iteration 219: Best Cost = 1.9324396818212954\n",
            "Iteration 220: Best Cost = 1.9324396818212954\n",
            "Iteration 221: Best Cost = 1.9324396818212954\n",
            "Iteration 222: Best Cost = 1.9324396818212954\n",
            "Iteration 223: Best Cost = 1.9324396818212954\n",
            "Iteration 224: Best Cost = 1.9324396818212954\n",
            "Iteration 225: Best Cost = 1.9324396818212954\n",
            "Iteration 226: Best Cost = 1.9324396818212954\n",
            "Iteration 227: Best Cost = 1.9324396818212954\n",
            "Iteration 228: Best Cost = 1.9324396818212954\n",
            "Iteration 229: Best Cost = 1.9324396818212954\n",
            "Iteration 230: Best Cost = 1.9324396818212954\n",
            "Iteration 231: Best Cost = 1.9324396818212954\n",
            "Iteration 232: Best Cost = 1.9324396818212954\n",
            "Iteration 233: Best Cost = 1.9324396818212954\n",
            "Iteration 234: Best Cost = 1.9324396818212954\n",
            "Iteration 235: Best Cost = 1.9324396818212954\n",
            "Iteration 236: Best Cost = 1.9324396818212954\n",
            "Iteration 237: Best Cost = 1.9324396818212954\n",
            "Iteration 238: Best Cost = 1.9324396818212954\n",
            "Iteration 239: Best Cost = 1.9324396818212954\n",
            "Iteration 240: Best Cost = 1.9324396818212954\n",
            "Iteration 241: Best Cost = 1.9324396818212954\n",
            "Iteration 242: Best Cost = 1.9324396818212954\n",
            "Iteration 243: Best Cost = 1.9324396818212954\n",
            "Iteration 244: Best Cost = 1.9324396818212954\n",
            "Iteration 245: Best Cost = 1.9324396818212954\n",
            "Iteration 246: Best Cost = 1.9324396818212954\n",
            "Iteration 247: Best Cost = 1.9324396818212954\n",
            "Iteration 248: Best Cost = 1.9324396818212954\n",
            "Iteration 249: Best Cost = 1.9324396818212954\n",
            "Iteration 250: Best Cost = 1.9324396818212954\n",
            "Iteration 251: Best Cost = 1.9324396818212954\n",
            "Iteration 252: Best Cost = 1.9324396818212954\n",
            "Iteration 253: Best Cost = 1.9324396818212954\n",
            "Iteration 254: Best Cost = 1.9324396818212954\n",
            "Iteration 255: Best Cost = 1.9324396818212954\n",
            "Iteration 256: Best Cost = 1.9324396818212954\n",
            "Iteration 257: Best Cost = 1.9324396818212954\n",
            "Iteration 258: Best Cost = 1.9324396818212954\n",
            "Iteration 259: Best Cost = 1.9324396818212954\n",
            "Iteration 260: Best Cost = 1.9324396818212954\n",
            "Iteration 261: Best Cost = 1.9324396818212954\n",
            "Iteration 262: Best Cost = 1.9324396818212954\n",
            "Iteration 263: Best Cost = 1.9324396818212954\n",
            "Iteration 264: Best Cost = 1.9324396818212954\n",
            "Iteration 265: Best Cost = 1.9324396818212954\n",
            "Iteration 266: Best Cost = 1.9324396818212954\n",
            "Iteration 267: Best Cost = 1.9324396818212954\n",
            "Iteration 268: Best Cost = 1.9324396818212954\n",
            "Iteration 269: Best Cost = 1.9324396818212954\n",
            "Iteration 270: Best Cost = 1.9324396818212954\n",
            "Iteration 271: Best Cost = 1.9324396818212954\n",
            "Iteration 272: Best Cost = 1.9324396818212954\n",
            "Iteration 273: Best Cost = 1.9324396818212954\n",
            "Iteration 274: Best Cost = 1.9324396818212954\n",
            "Iteration 275: Best Cost = 1.9324396818212954\n",
            "Iteration 276: Best Cost = 1.9324396818212954\n",
            "Iteration 277: Best Cost = 1.9324396818212954\n",
            "Iteration 278: Best Cost = 1.9324396818212954\n",
            "Iteration 279: Best Cost = 1.9324396818212954\n",
            "Iteration 280: Best Cost = 1.9324396818212954\n",
            "Iteration 281: Best Cost = 1.9324396818212954\n",
            "Iteration 282: Best Cost = 1.9324396818212954\n",
            "Iteration 283: Best Cost = 1.9324396818212954\n",
            "Iteration 284: Best Cost = 1.9324396818212954\n",
            "Iteration 285: Best Cost = 1.9324396818212954\n",
            "Iteration 286: Best Cost = 1.9324396818212954\n",
            "Iteration 287: Best Cost = 1.9324396818212954\n",
            "Iteration 288: Best Cost = 1.9324396818212954\n",
            "Iteration 289: Best Cost = 1.9324396818212954\n",
            "Iteration 290: Best Cost = 1.9324396818212954\n",
            "Iteration 291: Best Cost = 1.9324396818212954\n",
            "Iteration 292: Best Cost = 1.2427377615018804\n",
            "Iteration 293: Best Cost = 1.2427377615018804\n",
            "Iteration 294: Best Cost = 1.2427377615018804\n",
            "Iteration 295: Best Cost = 1.2427377615018804\n",
            "Iteration 296: Best Cost = 1.2427377615018804\n",
            "Iteration 297: Best Cost = 1.2427377615018804\n",
            "Iteration 298: Best Cost = 1.2427377615018804\n",
            "Iteration 299: Best Cost = 1.2427377615018804\n",
            "Iteration 300: Best Cost = 1.2427377615018804\n",
            "Iteration 301: Best Cost = 1.2427377615018804\n",
            "Iteration 302: Best Cost = 1.2427377615018804\n",
            "Iteration 303: Best Cost = 1.2427377615018804\n",
            "Iteration 304: Best Cost = 1.2427377615018804\n",
            "Iteration 305: Best Cost = 1.2427377615018804\n",
            "Iteration 306: Best Cost = 1.2427377615018804\n",
            "Iteration 307: Best Cost = 1.2427377615018804\n",
            "Iteration 308: Best Cost = 1.2427377615018804\n",
            "Iteration 309: Best Cost = 1.2427377615018804\n",
            "Iteration 310: Best Cost = 1.2427377615018804\n",
            "Iteration 311: Best Cost = 1.2427377615018804\n",
            "Iteration 312: Best Cost = 1.2427377615018804\n",
            "Iteration 313: Best Cost = 1.2427377615018804\n",
            "Iteration 314: Best Cost = 1.2427377615018804\n",
            "Iteration 315: Best Cost = 1.2427377615018804\n",
            "Iteration 316: Best Cost = 1.2427377615018804\n",
            "Iteration 317: Best Cost = 1.2427377615018804\n",
            "Iteration 318: Best Cost = 1.2427377615018804\n",
            "Iteration 319: Best Cost = 1.2427377615018804\n",
            "Iteration 320: Best Cost = 1.2427377615018804\n",
            "Iteration 321: Best Cost = 1.2427377615018804\n",
            "Iteration 322: Best Cost = 1.2427377615018804\n",
            "Iteration 323: Best Cost = 1.2427377615018804\n",
            "Iteration 324: Best Cost = 1.2427377615018804\n",
            "Iteration 325: Best Cost = 1.2427377615018804\n",
            "Iteration 326: Best Cost = 1.2427377615018804\n",
            "Iteration 327: Best Cost = 1.2427377615018804\n",
            "Iteration 328: Best Cost = 1.2427377615018804\n",
            "Iteration 329: Best Cost = 1.2427377615018804\n",
            "Iteration 330: Best Cost = 1.2427377615018804\n",
            "Iteration 331: Best Cost = 1.2427377615018804\n",
            "Iteration 332: Best Cost = 1.2427377615018804\n",
            "Iteration 333: Best Cost = 1.2427377615018804\n",
            "Iteration 334: Best Cost = 1.2427377615018804\n",
            "Iteration 335: Best Cost = 1.2427377615018804\n",
            "Iteration 336: Best Cost = 1.2427377615018804\n",
            "Iteration 337: Best Cost = 1.2427377615018804\n",
            "Iteration 338: Best Cost = 1.2427377615018804\n",
            "Iteration 339: Best Cost = 1.2427377615018804\n",
            "Iteration 340: Best Cost = 1.2427377615018804\n",
            "Iteration 341: Best Cost = 1.2427377615018804\n",
            "Iteration 342: Best Cost = 1.2427377615018804\n",
            "Iteration 343: Best Cost = 1.2427377615018804\n",
            "Iteration 344: Best Cost = 1.2427377615018804\n",
            "Iteration 345: Best Cost = 1.2427377615018804\n",
            "Iteration 346: Best Cost = 1.2427377615018804\n",
            "Iteration 347: Best Cost = 1.2427377615018804\n",
            "Iteration 348: Best Cost = 1.2427377615018804\n",
            "Iteration 349: Best Cost = 1.2427377615018804\n",
            "Iteration 350: Best Cost = 1.2427377615018804\n",
            "Iteration 351: Best Cost = 1.2427377615018804\n",
            "Iteration 352: Best Cost = 1.2427377615018804\n",
            "Iteration 353: Best Cost = 1.2427377615018804\n",
            "Iteration 354: Best Cost = 1.2427377615018804\n",
            "Iteration 355: Best Cost = 1.2427377615018804\n",
            "Iteration 356: Best Cost = 1.2427377615018804\n",
            "Iteration 357: Best Cost = 1.2427377615018804\n",
            "Iteration 358: Best Cost = 1.2427377615018804\n",
            "Iteration 359: Best Cost = 1.2427377615018804\n",
            "Iteration 360: Best Cost = 1.2427377615018804\n",
            "Iteration 361: Best Cost = 1.2427377615018804\n",
            "Iteration 362: Best Cost = 1.2427377615018804\n",
            "Iteration 363: Best Cost = 1.2427377615018804\n",
            "Iteration 364: Best Cost = 1.2427377615018804\n",
            "Iteration 365: Best Cost = 1.2427377615018804\n",
            "Iteration 366: Best Cost = 1.2427377615018804\n",
            "Iteration 367: Best Cost = 1.2427377615018804\n",
            "Iteration 368: Best Cost = 1.2427377615018804\n",
            "Iteration 369: Best Cost = 1.2427377615018804\n",
            "Iteration 370: Best Cost = 1.2427377615018804\n",
            "Iteration 371: Best Cost = 1.2427377615018804\n",
            "Iteration 372: Best Cost = 1.2427377615018804\n",
            "Iteration 373: Best Cost = 1.2427377615018804\n",
            "Iteration 374: Best Cost = 1.2427377615018804\n",
            "Iteration 375: Best Cost = 1.2427377615018804\n",
            "Iteration 376: Best Cost = 1.2427377615018804\n",
            "Iteration 377: Best Cost = 1.2427377615018804\n",
            "Iteration 378: Best Cost = 1.2427377615018804\n",
            "Iteration 379: Best Cost = 1.2427377615018804\n",
            "Iteration 380: Best Cost = 1.2427377615018804\n",
            "Iteration 381: Best Cost = 1.2427377615018804\n",
            "Iteration 382: Best Cost = 1.2427377615018804\n",
            "Iteration 383: Best Cost = 1.2427377615018804\n",
            "Iteration 384: Best Cost = 1.2427377615018804\n",
            "Iteration 385: Best Cost = 1.2427377615018804\n",
            "Iteration 386: Best Cost = 1.2427377615018804\n",
            "Iteration 387: Best Cost = 1.2427377615018804\n",
            "Iteration 388: Best Cost = 1.2427377615018804\n",
            "Iteration 389: Best Cost = 1.2427377615018804\n",
            "Iteration 390: Best Cost = 1.2427377615018804\n",
            "Iteration 391: Best Cost = 1.2427377615018804\n",
            "Iteration 392: Best Cost = 1.2427377615018804\n",
            "Iteration 393: Best Cost = 1.2427377615018804\n",
            "Iteration 394: Best Cost = 1.2427377615018804\n",
            "Iteration 395: Best Cost = 1.2427377615018804\n",
            "Iteration 396: Best Cost = 1.2427377615018804\n",
            "Iteration 397: Best Cost = 1.2427377615018804\n",
            "Iteration 398: Best Cost = 1.2427377615018804\n",
            "Iteration 399: Best Cost = 1.2427377615018804\n",
            "Iteration 400: Best Cost = 1.2427377615018804\n",
            "Iteration 401: Best Cost = 1.2427377615018804\n",
            "Iteration 402: Best Cost = 1.2427377615018804\n",
            "Iteration 403: Best Cost = 1.2427377615018804\n",
            "Iteration 404: Best Cost = 1.2427377615018804\n",
            "Iteration 405: Best Cost = 1.2427377615018804\n",
            "Iteration 406: Best Cost = 1.2427377615018804\n",
            "Iteration 407: Best Cost = 1.2427377615018804\n",
            "Iteration 408: Best Cost = 1.2427377615018804\n",
            "Iteration 409: Best Cost = 1.2427377615018804\n",
            "Iteration 410: Best Cost = 1.2427377615018804\n",
            "Iteration 411: Best Cost = 1.2427377615018804\n",
            "Iteration 412: Best Cost = 1.2427377615018804\n",
            "Iteration 413: Best Cost = 1.2427377615018804\n",
            "Iteration 414: Best Cost = 1.2427377615018804\n",
            "Iteration 415: Best Cost = 1.2427377615018804\n",
            "Iteration 416: Best Cost = 1.2427377615018804\n",
            "Iteration 417: Best Cost = 1.2427377615018804\n",
            "Iteration 418: Best Cost = 1.2427377615018804\n",
            "Iteration 419: Best Cost = 1.2427377615018804\n",
            "Iteration 420: Best Cost = 1.2427377615018804\n",
            "Iteration 421: Best Cost = 1.2427377615018804\n",
            "Iteration 422: Best Cost = 1.2427377615018804\n",
            "Iteration 423: Best Cost = 1.2427377615018804\n",
            "Iteration 424: Best Cost = 1.2427377615018804\n",
            "Iteration 425: Best Cost = 1.2427377615018804\n",
            "Iteration 426: Best Cost = 1.2427377615018804\n",
            "Iteration 427: Best Cost = 1.2427377615018804\n",
            "Iteration 428: Best Cost = 1.2427377615018804\n",
            "Iteration 429: Best Cost = 1.2427377615018804\n",
            "Iteration 430: Best Cost = 1.2427377615018804\n",
            "Iteration 431: Best Cost = 1.2427377615018804\n",
            "Iteration 432: Best Cost = 1.2427377615018804\n",
            "Iteration 433: Best Cost = 1.2427377615018804\n",
            "Iteration 434: Best Cost = 1.2427377615018804\n",
            "Iteration 435: Best Cost = 1.2427377615018804\n",
            "Iteration 436: Best Cost = 1.2427377615018804\n",
            "Iteration 437: Best Cost = 1.2427377615018804\n",
            "Iteration 438: Best Cost = 1.2427377615018804\n",
            "Iteration 439: Best Cost = 1.2427377615018804\n",
            "Iteration 440: Best Cost = 1.2427377615018804\n",
            "Iteration 441: Best Cost = 1.2427377615018804\n",
            "Iteration 442: Best Cost = 1.2427377615018804\n",
            "Iteration 443: Best Cost = 1.2427377615018804\n",
            "Iteration 444: Best Cost = 1.2427377615018804\n",
            "Iteration 445: Best Cost = 1.2427377615018804\n",
            "Iteration 446: Best Cost = 1.2427377615018804\n",
            "Iteration 447: Best Cost = 1.2427377615018804\n",
            "Iteration 448: Best Cost = 1.2427377615018804\n",
            "Iteration 449: Best Cost = 1.2427377615018804\n",
            "Iteration 450: Best Cost = 1.2427377615018804\n",
            "Iteration 451: Best Cost = 1.2427377615018804\n",
            "Iteration 452: Best Cost = 1.2427377615018804\n",
            "Iteration 453: Best Cost = 1.2427377615018804\n",
            "Iteration 454: Best Cost = 1.2427377615018804\n",
            "Iteration 455: Best Cost = 1.2427377615018804\n",
            "Iteration 456: Best Cost = 1.2427377615018804\n",
            "Iteration 457: Best Cost = 1.2427377615018804\n",
            "Iteration 458: Best Cost = 1.2427377615018804\n",
            "Iteration 459: Best Cost = 1.2427377615018804\n",
            "Iteration 460: Best Cost = 1.2427377615018804\n",
            "Iteration 461: Best Cost = 1.2427377615018804\n",
            "Iteration 462: Best Cost = 1.2427377615018804\n",
            "Iteration 463: Best Cost = 1.2427377615018804\n",
            "Iteration 464: Best Cost = 1.2427377615018804\n",
            "Iteration 465: Best Cost = 1.2427377615018804\n",
            "Iteration 466: Best Cost = 1.2427377615018804\n",
            "Iteration 467: Best Cost = 1.2427377615018804\n",
            "Iteration 468: Best Cost = 1.2427377615018804\n",
            "Iteration 469: Best Cost = 1.2427377615018804\n",
            "Iteration 470: Best Cost = 1.2427377615018804\n",
            "Iteration 471: Best Cost = 1.2427377615018804\n",
            "Iteration 472: Best Cost = 1.2427377615018804\n",
            "Iteration 473: Best Cost = 1.2427377615018804\n",
            "Iteration 474: Best Cost = 1.2427377615018804\n",
            "Iteration 475: Best Cost = 1.2427377615018804\n",
            "Iteration 476: Best Cost = 1.2427377615018804\n",
            "Iteration 477: Best Cost = 1.2427377615018804\n",
            "Iteration 478: Best Cost = 1.2427377615018804\n",
            "Iteration 479: Best Cost = 1.2427377615018804\n",
            "Iteration 480: Best Cost = 1.2427377615018804\n",
            "Iteration 481: Best Cost = 1.2427377615018804\n",
            "Iteration 482: Best Cost = 1.2427377615018804\n",
            "Iteration 483: Best Cost = 1.2427377615018804\n",
            "Iteration 484: Best Cost = 1.2427377615018804\n",
            "Iteration 485: Best Cost = 1.2427377615018804\n",
            "Iteration 486: Best Cost = 1.2427377615018804\n",
            "Iteration 487: Best Cost = 1.2427377615018804\n",
            "Iteration 488: Best Cost = 1.2427377615018804\n",
            "Iteration 489: Best Cost = 1.2427377615018804\n",
            "Iteration 490: Best Cost = 1.2427377615018804\n",
            "Iteration 491: Best Cost = 1.2427377615018804\n",
            "Iteration 492: Best Cost = 1.2427377615018804\n",
            "Iteration 493: Best Cost = 1.2427377615018804\n",
            "Iteration 494: Best Cost = 1.2427377615018804\n",
            "Iteration 495: Best Cost = 1.2427377615018804\n",
            "Iteration 496: Best Cost = 1.2427377615018804\n",
            "Iteration 497: Best Cost = 1.2427377615018804\n",
            "Iteration 498: Best Cost = 1.2427377615018804\n",
            "Iteration 499: Best Cost = 1.2427377615018804\n",
            "Iteration 500: Best Cost = 1.2427377615018804\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "<function matplotlib.pyplot.show>"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 13
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEWCAYAAACNJFuYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAdgElEQVR4nO3de5RcZZ3u8e/T3UnIjQSSNkIaiQzQgAhhgh4uUZuLiGhwPLAcFBFmcDLOzGJwDh4uioCuOcqcQZBBHYiXEQdEATlH9HgGwqUQjohDuEggQe4ECAkEAulOzK1/54+9K1V0Jd2Vrl1VXbufz1q9Ur1r165fvVndT7/vu/e7FRGYmZmVa2t2AWZmNvI4HMzMrILDwczMKjgczMysgsPBzMwqOBzMzKyCw8FGLUlflPS9Ohz3IknXZH3c9Njvk/T4IM/PkhSSOurx/jZ6OBysoSSdJOk+SX2SVqaP/1aS6vy+PZJeKN8WEV+LiM/WcMwfStokaZfaK6xORNwdEd1lNTwr6ehGvb+NHg4HaxhJZwGXA/8MvB2YAXwOOBwY28TStpukicAJwBvApxv0nu4NWMM4HKwhJE0Bvgr8bUTcGBFrIvFgRJwcEevT/cZJukTS85JWSLpS0vj0uR5JL0g6K+11LJf0F2XvsdXXpr/I/y+wq6Te9GvXgcM/kuZK+o2k1ZKWSTptkI90ArA6/UynDvHZPyPpOUmrJH25/K/9tOZvSnop/fqmpHEDPu85kl4G/q28ByTp34F3AL9IP9PZZW97ctoOr0r6UlktF0m6QdI1ktZIekTS3pLOS9t0maRjhvjvtFHA4WCNcigwDvj5EPtdDOwNzAb2BGYCF5Q9/3ZgSrr9dODbknYa7LUR0Qd8GHgpIialXy+Vv6mk3UkC5AqgMz3GQ4PUeSpwHfATYB9Jc7a2k6T9gO8AJwO7lNVe9CXgkPT9DgTeC5w/4PPuDOwOzC8/dkSc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3pk+dxDweZJ7huwBHJ6u6XQFcGJEzAF+APyPsuONjYiDI+IbwD3AIRFxEMl6P2dHxLMkv/wvi2St/bsH1PMj4JyIOIDkatULy57riIj3pjUVt38OuDwiZgMHk1w9b1ZXHlayXJL0bZK/7jcAzwEHSCquvzOF5KYnG4DfRcQL6WseIrmfxmqSnsTCdBXYdpJlTYp+Wva4C/hpusjZWOCZIeqaAkyNiLvSTVeTLPFQVFxgcFFaC8C9wJckdQE3uddgjeCeg+XFo8CWWx9GxN+RDOV0kqwrc0b6V/zsiHhnRNya7rq+7BibSf5gEvBo2f7vjohjyvbrK3t8BfCtiHg38Nck6/nUolhPsRYi4sckcyfrgF9JOrLG9zAbksPB8uIOYAdJf1O2bUL67y3A36TDRUjaO13JclseBzolHZruPyYd99+aKZSWPj61bPsaYPLAnSPiDeB1Se9LN50C3DVwv3KS9gCejoh/IVll84DB9jfLgsPBciGSMyv+DPiApGck/Y5kyOYc4HvAY8ADkhaT3DJxm0OqEbGBZInnf5L0MMkE9GHb2P0i4AZJi0gmrot+AXw8vfn7+wa85lTgnyX9nuSe0F8d4uN9AlicDnvtTzJnYVZXPlvJzMwquOdgZmYVHA5mZlbB4WBmZhUcDmZmVsHhYGZmFRwOZmZWweFgZmYV/j9knRC1VPqv3gAAAABJRU5ErkJggg==\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": [],
            "needs_background": "light"
          }
        }
      ]
    }
  ]
}